package server.content.skills.wc;

import core.util.Misc;

public enum Trees {

	NORMAL(new int[] {1278, 1276, 1286, 1282}, 1, 1, 1511, 65, 3,  32), 
	OAK(new int[] {1281}, 15, 5, 1521, 95, 6, 75), 
	WILLOW(new int[] {5553, 5551, 1308, 5552}, 30, 8, 1519, 150, 10, 185),
	MAPLE(new int[] {1307}, 45, 8, 1517, 190, 9, 210),
	YEW(new int[] {1309}, 60, 12, 1515, 240, 10, 240),
	MAGIC(new int[] {1306}, 75, 16, 1513, 290, 11, 270);

	private final int treeIds[];
	private final int lvlReq;
	private final int logId;
	private final int exp;
	private final int diff;
	private final int maxLogs;
	private final int respawnTime;

	private Trees(final int[] treeIds, final int lvlReq, final int maxLogs,
			final int logId, final int exp, final int diff, final int respawnTime) {
		this.treeIds = treeIds;
		this.lvlReq = lvlReq;
		this.logId = logId;
		this.exp = exp;
		this.diff = diff;
		this.maxLogs = maxLogs;
		this.respawnTime = respawnTime;
	}

	public static Trees getTreeForId(final int id) {
		for (final Trees tree : Trees.values()) {
			if (tree == null)
				continue;
			for (final int i : tree.getTreeIds()) {
				if (id == i) {
					return tree;
				}
			}
		}
		return null;
	}
	
	public int getDiff() {
		return diff;
	}
	
	public int getXP() {
		return exp;
	}
	
	public int getLogId() {
		return logId;
	}

	public int[] getTreeIds() {
		return treeIds;
	}

	public int getLvlReq() {
		return lvlReq;
	}

	public int getMaxLogs() {
		return maxLogs;
	}

	public int getRespawnTime() {
		return respawnTime;
	}

}
